Insert Stored Procedure, Using Asp.Net WebForm to Insert new [Customer]
Posted
by
user2953815
on Stack Overflow
See other posts from Stack Overflow
or by user2953815
Published on 2013-11-05T07:25:59Z
Indexed on
2013/11/05
15:54 UTC
Read the original article
Hit count: 267
Can someone please help me create a stored procedure to insert a new customer from a web form. I am having difficulty making the state a drop down list for customer to pick a state from the list and having that inserted into the database.
INSERT INTO Customer
(
Cust_First,
Cust_Middle,
Cust_Last,
Cust_Phone,
Cust_Alt_Phone,
Cust_Email,
Add_Line1,
Add_Line2,
Add_Bill_Line1,
Add_Bill_Line2,
City,
State_Prov_Name,
Postal_Zip_Code,
Country_ID
)
VALUES
(
@Cust_First,
@Cust_Middle,
@Cust_Last,
@Cust_Phone,
@Cust_Alt_Phone,
@Cust_Email,
@Add_Line1,
@Add_Line2,
@Add_Bill_Line1,
@Add_Bill_Line2,
@City,
@State_Prov_Name,
@Postal_Zip_Code,
@Country_ID
)">
<InsertParameters>
<asp:Parameter Name="Cust_First" Type="String"></asp:Parameter>
<asp:Parameter Name="Cust_Middle" Type="String"></asp:Parameter>
<asp:Parameter Name="Cust_Last" Type="String"></asp:Parameter>
<asp:Parameter Name="Cust_Phone" Type="String"></asp:Parameter>
<asp:Parameter Name="Cust_Alt_Phone" Type="String"></asp:Parameter>
<asp:Parameter Name="Cust_Email" Type="String"></asp:Parameter>
<asp:Parameter Name="Add_Line1" Type="String"></asp:Parameter>
<asp:Parameter Name="Add_Line2" Type="String"></asp:Parameter>
<asp:Parameter Name="Add_Bill_Line1" Type="String"></asp:Parameter>
<asp:Parameter Name="Add_Bill_Line2" Type="String"></asp:Parameter>
<asp:Parameter Name="City" Type="String"></asp:Parameter>
<asp:Parameter Name="Postal_Zip_Code" Type="String"></asp:Parameter>
<asp:Parameter Name="Cust_ID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="State_Prov_Name" Type="String"></asp:Parameter>
<asp:Parameter Name="Country_Name" Type="String"></asp:Parameter>
</InsertParameters>
© Stack Overflow or respective owner